/************************* 版权声明 *********************************
 * 
 * 版权所有：meymey
 * 
 ************************* 版本声明 *********************************
 *@since jdk1.5
 *@version 0.6
 ************************* 变更记录 *********************************
 *
 * 创建者：biqiang Email:biqiang@winmess.com   创建日期：2010-8-30
 * 创建记录：创建类结构。
 *
 ************************* 类描述 *********************************×
 *职员
 ************************* To  Do *********************************
 *
 ************************* 随   笔 ***********************************
 *
 ******************************************************************
 */
package com.realgodo.site.entity.site;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.realgodo.site.entity.IdEntity;

@Entity
@Table(name = "crew")
public class Crew extends IdEntity {
	private static final long serialVersionUID = 75130390021725216L;

	private String name;

	private CrewCategory category;

	private EventJoinerRecord joinerRecord;

	@Column(name = "name", length = 50)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@ManyToOne
	@JoinColumn(name = "category_id", referencedColumnName = "id", nullable = false)
	public CrewCategory getCategory() {
		return category;
	}

	public void setCategory(CrewCategory category) {
		this.category = category;
	}

	@ManyToOne
	@JoinColumn(name = "joiner_record_id", referencedColumnName = "id", nullable = false)
	public EventJoinerRecord getJoinerRecord() {
		return joinerRecord;
	}

	public void setJoinerRecord(EventJoinerRecord joinerRecord) {
		this.joinerRecord = joinerRecord;
	}

}
